package com.jiazhong.排序;

public class Maopao {
    public static void main(String[] args) {
        int a[]={34,43,13,21,23,25,45,63,6};
        int temp=0;
        for (int i=0;i< a.length-1;i++){
            for (int j=0;j<a.length-1-i;j++){
                if (a[j]>a[j+1]){
                    temp=a[j];
                    a[j]=a[j+1];
                    a[j+1]=temp;
                }
            }
            System.out.println("第"+(i+1)+"轮:");
            for (int index=0;index< a.length;index++){
                System.out.print(" "+a[index]);
            }
            System.out.println();
        }
    }
}
